import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const UserInfro = 'souvenirUserInfo'
const UserInformation = 'souvenirUserInfo'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getUserInformation() {
  return Cookies.get(UserInformation)
}

export function setUserInformation(data) {
  return Cookies.set(UserInformation, data)
}

export function removeUserInformation() {
  return Cookies.remove(UserInformation)
}

export function getUserInfro() {
  return sessionStorage.getItem(UserInfro)
}

export function setUserInfro(data) {
  return sessionStorage.setItem(UserInfro, data)
}

export function removeUserInfro() {
  return sessionStorage.removeItem(UserInfro)
}

